import { SwaggerRouter } from 'koa-swagger-decorator';
import path from 'path'

const swaggerRouter = new SwaggerRouter<any, any>();

// swagger docs avaliable at http://localhost:3000/swagger-html
swaggerRouter.swagger({
    title: 'API DOC示例',
    description: '用来示范滴API DOC',
    version: '5.2.0',
});

// 配置controller
swaggerRouter.mapDir(path.resolve(__dirname, '../../dist/controller/'), {
    ignore: ["**.d.ts"],
});

export default swaggerRouter;